<%@ page import="util.DBUtil" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/10/26
  Time: 14:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    //获得传递过来的要删除的用户id
    String id =request.getParameter("id");
    //设置要执行的sql语句
    String sql ="delete from tb_user where id="+id;
    //调用DButil对象执行sql
    DBUtil dbUtil =new DBUtil();
    int n=dbUtil.update(sql);
    if (n>0)
        response.sendRedirect("user.jsp");
    else
        response.sendRedirect("删除失败！");
%>